package com.tgr.shortLink.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tgr.shortLink.project.dao.entity.LinkDO;
import com.tgr.shortLink.project.dto.req.LinkCreateReqDTO;
import com.tgr.shortLink.project.dto.req.LinkPageReqDTO;
import com.tgr.shortLink.project.dto.req.LinkUpdateReqDTO;
import com.tgr.shortLink.project.dto.resp.LinkCreateRespDTO;
import com.tgr.shortLink.project.dto.resp.LinkGroupQueryRespDTO;
import com.tgr.shortLink.project.dto.resp.LinkPageRespDTO;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;

import java.util.List;

public interface LinkService extends IService<LinkDO> {
    LinkCreateRespDTO createLink(LinkCreateReqDTO requestParam);

    IPage<LinkPageRespDTO> pageLink(LinkPageReqDTO requestParam);

    List<LinkGroupQueryRespDTO> groupLinkCount(List<String> requestParam);

    void updateLink(LinkUpdateReqDTO requestParam);

    void restoreUrl(String shortUrl, ServletRequest request, ServletResponse response);

    String getLinkTitle(String url);
}
